<#-- 添加话题  集合 -->
<@function>
<#-- 已登录 -->
    <#if systemUser != null>
    <#--  返回Map<String,Object>类型 -->
        <#assign returnValue = topicRelated_addTopic_collection>

    <#--  全局允许提交话题 -->
        <#if returnValue['allowTopic'] == true>
            <!-- 话题编辑器允许使用标签 -->
            <input type="hidden" id="topicAvailableTag" value="${returnValue['availableTag']}">
            <!-- 用户等级 -->
            <input type="hidden" id="userGradeList" value="${returnValue['userGradeList']}">
            <!-- 文件系统 -->
            <input type="hidden" id="fileSystem" value="${returnValue['fileSystem']}">

            <div class="topic-formModule">
                <div class="addTopic-wrap">
                    <form id="addTopicForm" action="user/control/topic/add?page=${url_page}" method="post">

                        <#-- 提交后跳转参数  参数必须经过encodeBase64URL编码后才能提交 不填写时默认跳转回当前页 -->
                        <input type="hidden" id="jumpUrl" name="jumpUrl" value="">

                        <div style="height: 50px;">
                            <div style="float:left; *margin-top: 5px;">
                                <select id="tagId" name="tagId" class="formSelect">
                                    <option value="">选择标签</option>
                                    <#-- 引入标签选择 -->
                                    <@include action="${quote_1}"/>
                                </select>
                                <span id="${identificationNumber}_tagId_error" class="error"
                                      name="error">${(error['tagId'])!}</span>
                            </div>
                            <div style="float:left;margin-left: 5px;">

                                <input type="text" id="title" name="title" class="formText" size="90"
                                       value="${topic.title}" alt="标题" title="标题" placeholder="标题"/>
                                <span id="${identificationNumber}_title_error" class="error"
                                      name="error">${(error['title'])!}</span>
                            </div>
                            <#if returnValue['giveRedEnvelopeAmountMax'] == null ||  (returnValue['giveRedEnvelopeAmountMax'] != null && returnValue['giveRedEnvelopeAmountMax'] gt 0)>
                                <div class="redEnvelope" onclick="redEnvelopeFormLayer()">
                                    <span class="txt">红包</span>
                                    <i class="icon cms-angle-down"></i>
                                </div>
                            </#if>
                        </div>
                        <div id="type_layer" style="height: 40px;display: none;">
                            <label onclick="selectRedEnvelopeType()">
                                <input type="radio" class="formRadio" name="type"
                                       value="20" <#if giveRedEnvelope.type ==20> checked='checked'</#if>>
                                <span class="formRadio-core"></span>
                                <span class="formRadio-text">随机金额红包</span>
                            </label>
                            <label onclick="selectRedEnvelopeType()">
                                <input type="radio" class="formRadio" name="type"
                                       value="30" <#if giveRedEnvelope.type ==30> checked='checked'</#if>>
                                <span class="formRadio-core"></span>
                                <span class="formRadio-text">固定金额红包</span>
                            </label>
                        </div>
                        <div id="totalAmount_layer" style="height: 50px;display: none;">
                            <span class="text">红包总金额</span>
                            <input type="text" id="totalAmount" name="totalAmount" oninput="totalAmountCalculate(this)"
                                   class="formText" size="10" maxlength="10" value="${giveRedEnvelope.totalAmount}"
                                   alt="金额" title="金额" placeholder="金额"/>
                            <span class="text">元</span>
                            <span id="${identificationNumber}_totalAmount_error" class="error"
                                  name="error">${(error['totalAmount'])!}</span>
                            <span class="help">
								<#if returnValue['giveRedEnvelopeAmountMin'] gt 0>
                                    合计总金额不能少于 ${returnValue['giveRedEnvelopeAmountMin']} 元；
                                </#if>
                                <#if returnValue['giveRedEnvelopeAmountMax'] != null && returnValue['giveRedEnvelopeAmountMax'] gt 0>
                                    合计总金额不能超过${returnValue['giveRedEnvelopeAmountMax']} 元；
                                </#if>
								用户共有金额 ${returnValue['deposit']} 元
							</span>
                        </div>
                        <div id="singleAmount_layer" style="height: 50px;display: none;">
                            <span class="text">单个红包金额</span>
                            <input type="text" id="singleAmount" name="singleAmount" oninput="singleAmountCalculate()"
                                   class="formText" size="10" maxlength="8" value="${giveRedEnvelope.singleAmount}"
                                   alt="金额" title="金额" placeholder="金额"/>
                            <span class="text">元</span>
                            <span id="${identificationNumber}_singleAmount_error" class="error"
                                  name="error">${(error['singleAmount'])!}</span>
                            <span class="help">
								<#if returnValue['giveRedEnvelopeAmountMin'] gt 0>
                                    合计总金额不能少于 ${returnValue['giveRedEnvelopeAmountMin']} 元；
                                </#if>
                                <#if returnValue['giveRedEnvelopeAmountMax'] != null && returnValue['giveRedEnvelopeAmountMax'] gt 0>
                                    合计总金额不能超过${returnValue['giveRedEnvelopeAmountMax']} 元；
                                </#if>
								用户共有金额 ${returnValue['deposit']} 元
							</span>
                        </div>
                        <div id="giveQuantity_layer" style="height: 50px;display: none;">
                            <input type="text" id="giveQuantity" name="giveQuantity" oninput="singleAmountCalculate()"
                                   class="formText" size="5" maxlength="3" value="${giveRedEnvelope.giveQuantity}"
                                   alt="数量" title="数量" placeholder="数量"/>
                            <span class="text">个红包</span>
                            <span id="${identificationNumber}_giveQuantity_error" class="error"
                                  name="error">${(error['giveQuantity'])!}</span>
                        </div>
                        <div id="count_layer" style="height: 40px;display: none;">
                            <span class="text">合计总金额</span>
                            <span id="totalAmountView" class="text" style="font-size: 18px;">0.00</span>
                            <span id="${identificationNumber}_redEnvelopeLimit_error" class="error"
                                  name="error">${(error['redEnvelopeLimit'])!}</span>
                        </div>
                        <div>
                            <textarea class="textarea" onfocus="" id="topicContent"
                                      name="content">${topic.content}</textarea>
                        </div>

                        <span id="${identificationNumber}_content_error" class="error"
                              name="error">${(error['content'])!}</span>
                        <span id="${identificationNumber}_topic_error" class="error"
                              name="error">${error['topic']}</span>
                        <div class="form-action">
                            <#-- 获取令牌 -->
                            <input type="hidden" id="token" name="token" value="${token!}">

                            <div class="topicSubmit">
                                <!--
                                <span class="submitButton"><INPUT type="button" value="提交" onClick="javascript:sureSubmit(this.form)"></span> -->
                                <span class="submitButton"><INPUT id="${identificationNumber}_submitForm" type="button"
                                                                  value="提交"
                                                                  onClick="javascript:ajax_sureSubmit('${identificationNumber}')"></span>
                            </div>


                            <#-- identificationNumber:识别号：用来区别每次请求 -->
                            <#-- 验证码 -->
                            <#if returnValue['captchaKey'] != "">
                                <div class="captchaModule">
                                    <div class="captcha_div">
                                        <div class="captchaBox">
                                            <input type="hidden" id="${identificationNumber}_captchaKey"
                                                   name="captchaKey" value="${(returnValue['captchaKey'])!}">
                                            <input id="${identificationNumber}_captchaValue" name="captchaValue"
                                                   type="text" maxLength="5" autocomplete="off" tabindex="3"
                                                   onfocus="inputBoxTip_click(this);"
                                                   onblur="inputBoxTip_leave('${identificationNumber}',this);"/>
                                            <label class="promptTag" id="${identificationNumber}_captchaValueBoxTip"
                                                   for="captchaValue">验证码</label>
                                        </div>
                                        <a class="captchaImage" href="javascript:void(0);">
                                            <img id="${identificationNumber}_captcha"
                                                 src="captcha/${(returnValue['captchaKey'])!}.jpg"
                                                 onClick="replaceCaptcha('${identificationNumber}');" tabindex="4"/>
                                        </a>
                                        <a href="javascript:void(0);"
                                           onClick="replaceCaptcha('${identificationNumber}');" tabindex="5">换一幅</a>
                                    </div>
                                    <p class="tips">

                                        <#-- 验证码错误 -->
                                        <span id="${identificationNumber}_captchaValue_error"
                                              name="error">${(error['captchaValue'])!}</span>

                                    </p>
                                </div>
                            </#if>
                        </div>
                        <script type="text/javascript">
                            //显示/隐藏红包表单层
                            function redEnvelopeFormLayer() {
                                var layer = document.getElementById("type_layer").style.display;
                                if (layer == "none") {//执行显示
                                    document.getElementById("type_layer").style.display = "";
                                    document.getElementById("giveQuantity_layer").style.display = "";
                                    document.getElementById("count_layer").style.display = "";
                                    var type_radio = document.getElementsByName("type");
                                    var selectedValue = "";
                                    for (var i = 0; i < type_radio.length; i++) {
                                        var type = type_radio[i];
                                        if (type.checked) {
                                            selectedValue = parseInt(type.value);
                                        }
                                    }
                                    //如果没选中值，则默认选第一个
                                    if (selectedValue == "") {
                                        selectedValue = 20;
                                        type_radio[0].checked = true;
                                    }

                                    if (selectedValue == 20) {
                                        document.getElementById("totalAmount_layer").style.display = "";
                                        document.getElementById("singleAmount_layer").style.display = "none";
                                    } else if (selectedValue == 30) {
                                        document.getElementById("totalAmount_layer").style.display = "none";
                                        document.getElementById("singleAmount_layer").style.display = "";
                                    }


                                } else {//执行隐藏
                                    document.getElementById("type_layer").style.display = "none";
                                    document.getElementById("totalAmount_layer").style.display = "none";
                                    document.getElementById("singleAmount_layer").style.display = "none";
                                    document.getElementById("giveQuantity_layer").style.display = "none";
                                    document.getElementById("count_layer").style.display = "none";
                                }
                            }

                            //选择红包类型
                            function selectRedEnvelopeType() {
                                var type_radio = document.getElementsByName("type");
                                for (var i = 0; i < type_radio.length; i++) {
                                    var type = type_radio[i];
                                    if (type.checked) {
                                        var selectedValue = parseInt(type.value);
                                        if (selectedValue == 20) {
                                            document.getElementById("totalAmount_layer").style.display = "";
                                            document.getElementById("singleAmount_layer").style.display = "none";
                                            totalAmountCalculate(document.getElementById("totalAmount"));
                                        } else if (selectedValue == 30) {
                                            document.getElementById("totalAmount_layer").style.display = "none";
                                            document.getElementById("singleAmount_layer").style.display = "";
                                            singleAmountCalculate(document.getElementById("singleAmount"));
                                        }
                                    }
                                }

                            }

                            //总金额计算
                            function totalAmountCalculate(obj) {
                                var selectedValue = 0;
                                var type_radio = document.getElementsByName("type");
                                for (var i = 0; i < type_radio.length; i++) {
                                    var type = type_radio[i];
                                    if (type.checked) {
                                        var selectedValue = parseInt(type.value);
                                    }
                                }
                                if (selectedValue == 20) {
                                    var value = obj.value;
                                    //金额 只允许正数  正则判断最多10位小数
                                    var exp = /(^[1-9]([0-9]+)?(\.[0-9]{1,10})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                                    if (exp.test(value.trim())) {
                                        var amount = calc_add(obj.value.trim(), 0, 2);
                                        document.getElementById("totalAmountView").innerHTML = amount;
                                    } else {
                                        document.getElementById("totalAmountView").innerHTML = "0.00";
                                    }
                                }
                            }

                            //单个红包金额计算
                            function singleAmountCalculate(obj) {
                                var selectedValue = 0;
                                var type_radio = document.getElementsByName("type");
                                for (var i = 0; i < type_radio.length; i++) {
                                    var type = type_radio[i];
                                    if (type.checked) {
                                        var selectedValue = parseInt(type.value);
                                    }
                                }
                                if (selectedValue == 30) {
                                    var singleAmount = document.getElementById("singleAmount").value;
                                    var giveQuantity = document.getElementById("giveQuantity").value;
                                    //金额 只允许正数  正则判断最多10位小数
                                    var exp_singleAmount = /(^[1-9]([0-9]+)?(\.[0-9]{1,10})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                                    //数量 正整数
                                    var exp_giveQuantity = /^\+?[1-9][0-9]*$/;
                                    if (exp_singleAmount.test(singleAmount.trim()) && exp_giveQuantity.test(giveQuantity.trim())) {
                                        var amount = calc_multiply(singleAmount.trim(), giveQuantity.trim(), 2);
                                        document.getElementById("totalAmountView").innerHTML = amount;
                                    } else {
                                        document.getElementById("totalAmountView").innerHTML = "0.00";
                                    }
                                }


                            }
                        </script>
                        <script type="text/javascript">
                            //点击输入框提示
                            function inputBoxTip_click(obj) {
                                document.getElementById(obj.id + "BoxTip").style.display = "none";

                            }

                            //离开输入框提示
                            function inputBoxTip_leave(identificationNumber, obj) {
                                if (obj.value != "") {
                                    document.getElementById(obj.id + "BoxTip").style.display = "none";
                                } else {
                                    document.getElementById(obj.id + "BoxTip").style.display = "";
                                }
                                verificationCode(identificationNumber);
                            }

                            //校对验证码 identificationNumber:识别号：用来区别每次请求
                            function verificationCode(identificationNumber) {
                                var flag = true;
                                if (document.getElementById(identificationNumber + "_" + "captchaKey") != null) {

                                    var captchaKey = document.getElementById(identificationNumber + "_" + "captchaKey").value;
                                    var parameter = document.getElementById(identificationNumber + "_" + "captchaValue").value;
                                    if (parameter != "") {

                                        var parameter_trim = trim(parameter);
                                        if (parameter_trim != "") {
                                            //ajax使用同步提交
                                            get_request(function (value) {
                                                if (value == "false") {

                                                    document.getElementById(identificationNumber + "_" + "captchaValue_error").innerHTML = "验证码错误";
                                                    flag = false;
                                                }
                                            },
                                                "checkCaptcha.htm?captchaKey=" + captchaKey + "&captchaValue=" + parameter_trim + "&timestamp=" + new Date().getTime(), false);

                                        } else {
                                            document.getElementById(identificationNumber + "_" + "captchaValue_error").innerHTML = "验证码不能为空";
                                            flag = false;
                                        }
                                    } else {
                                        document.getElementById(identificationNumber + "_" + "captchaValue_error").innerHTML = "验证码不能为空";
                                        flag = false;
                                    }
                                    if (flag == true) {
                                        document.getElementById(identificationNumber + "_" + "captchaValue_error").innerHTML = "";
                                    }
                                }

                                return flag;
                            }

                            //更换验证码
                            function replaceCaptcha(identificationNumber) {
                                var captchaKey = document.getElementById(identificationNumber + "_" + "captchaKey").value;
                                document.getElementById(identificationNumber + "_" + "captcha").src = "captcha/" + captchaKey + ".jpg?" + Math.random();
                            }

                            //解决提交按钮的click和富文本的blur事件冲突
                            $(document).ready(function () {
                                $("input[type='button']").mousedown(function (e) {
                                    e.preventDefault();
                                });
                            });

                            //表单Form方式提交
                            function sureSubmit(obj) {
                                obj.submit();
                            }

                            //Ajax方式提交
                            function ajax_sureSubmit(identificationNumber) {
                                //按钮设置 disabled="disabled"
                                document.getElementById(identificationNumber + "_submitForm").disabled = true;
                                //清空所有错误提示
                                var error_tag = getElementsByName_pseudo("span", "error");
                                for (var i = 0; i < error_tag.length; i++) {
                                    error_tag[i].innerHTML = "";

                                }


                                if (verificationCode() == true) {

                                    var parameter = "";


                                    //显示红包表单层
                                    var type_layer = document.getElementById("type_layer").style.display;
                                    if (type_layer != "none") {
                                        var type_radio = document.getElementsByName("type");
                                        var selectedValue = "";
                                        for (var i = 0; i < type_radio.length; i++) {
                                            var type = type_radio[i];
                                            if (type.checked) {
                                                selectedValue = parseInt(type.value);
                                            }
                                        }
                                        var totalAmount = document.getElementById("totalAmount").value;
                                        var singleAmount = document.getElementById("singleAmount").value;
                                        var giveQuantity = document.getElementById("giveQuantity").value;

                                        parameter += "&type=" + encodeURIComponent(selectedValue);
                                        parameter += "&totalAmount=" + encodeURIComponent(totalAmount);
                                        parameter += "&singleAmount=" + encodeURIComponent(singleAmount);
                                        parameter += "&giveQuantity=" + encodeURIComponent(giveQuantity);
                                    }


                                    //获取令牌
                                    parameter += "&token=" + document.getElementById("token").value;

                                    //获取验证码key
                                    var captchaKey = document.getElementById(identificationNumber + "_" + "captchaKey");
                                    if (captchaKey != null) {
                                        parameter += "&captchaKey=" + captchaKey.value;
                                    }

                                    //获取验证码value
                                    var captchaValue = document.getElementById(identificationNumber + "_" + "captchaValue");
                                    if (captchaValue != null) {
                                        parameter += "&captchaValue=" + captchaValue.value;
                                    }
                                    //标签
                                    var tagId = document.getElementById("tagId");

                                    var index = tagId.selectedIndex; // 选中索引

                                    var tagId_text = tagId.options[index].text; // 选中文本
                                    var tagId_value = tagId.options[index].value; // 选中值

                                    //获取标签
                                    parameter += "&tagId=" + encodeURIComponent(tagId_value);

                                    //获取标题
                                    var title = document.getElementById("title").value;
                                    parameter += "&title=" + encodeURIComponent(title);

                                    //获取内容
                                    var content = document.getElementById("topicContent").value;
                                    parameter += "&content=" + encodeURIComponent(content);


                                    //删除第一个&号,防止因为多了&号而出现警告: Parameters: Invalid chunk ignored.信息
                                    if (parameter.indexOf("&") == 0) {
                                        parameter = parameter.substring(1, parameter.length);
                                    }
                                    post_request(function (value) {
                                        var data = JSON.parse(value);
                                        for (var returnValue in data) {

                                            if (returnValue == "success") {
                                                if (data[returnValue] == "true") {
                                                    //需引入layer
                                                    layer.msg('提交成功,即将刷新本页',
                                                        {
                                                            time: 1000 //1秒关闭（如果不配置，默认是1秒）
                                                        }, function () {//关闭后的操作
                                                            //刷新页面
                                                            document.location.reload();
                                                        }
                                                    );

                                                }
                                            } else if (returnValue == "error") {

                                                var error = data[returnValue];
                                                for (var key in error) {
                                                    var error_html = document.getElementById(identificationNumber + "_" + key + "_error");

                                                    if (error_html != null) {
                                                        error_html.innerHTML = error[key];
                                                    }

                                                }
                                                //按钮设置 disabled="disabled"
                                                document.getElementById(identificationNumber + "_submitForm").disabled = false;
                                            } else if (returnValue == "captchaKey") {//显示验证码

                                                var captchaKey = data[returnValue];
                                                if (captchaKey != "") {
                                                    //设置验证码Key
                                                    if (document.getElementById(identificationNumber + "_" + "captchaKey") != null) {

                                                        document.getElementById(identificationNumber + "_" + "captchaKey").value = captchaKey;
                                                        //设置验证码图片
                                                        replaceCaptcha(identificationNumber);
                                                    }
                                                }
                                            }
                                        }
                                    },
                                        "user/control/topic/add?timestamp=" + new Date().getTime(), true, parameter);
                                } else {
                                    //按钮设置 disabled="disabled"
                                    document.getElementById(identificationNumber + "_submitForm").disabled = false;
                                }
                            }


                            KindEditor.lang({
                                hide: '隐藏'
                            });

                            // 指定编辑器iframe document的CSS数据，用于设置可视化区域的样式。 单冒号(:)用于CSS3伪类，双冒号(::)用于CSS3伪元素。伪元素由双冒号和伪元素名称组成。双冒号是在当前规范中引入的，用于区分伪类和伪元素。但是伪类兼容现存样式，浏览器需要同时支持旧的伪类，比如:first-line、:first-letter、:before、:after等
                            KindEditor.options.cssData = ".ke-content hide {" +
                                "border: 0;" +
                                "border-left: 3px solid #06b5ff;" +
                                "margin-left: 10px;" +
                                "padding: 0.5em;" +
                                "min-height:26px;" +
                                "display: block;" +
                                "margin: 30px 0px 0px 0px;" +
                                "}" +
                                ".ke-content .inputValue_10:before {" +
                                "content: '密码: ' attr(input-value) '';" +
                                " color: #06b5ff;" +
                                "font-size:14px;" +
                                "position: absolute;" +
                                "margin-top: -30px;" +
                                "line-height: 30px;" +
                                "}" +
                                ".ke-content .inputValue_20:before {" +
                                "content: '回复话题可见';" +
                                " color: #06b5ff;" +
                                "font-size:14px;" +
                                "position: absolute;" +
                                "margin-top: -30px;" +
                                "line-height: 30px;" +
                                "}" +
                                ".ke-content .inputValue_30:before {" +
                                "content: '等级达到 ' attr(description) ' 可见';" +
                                " color: #06b5ff;" +
                                "font-size:14px;" +
                                "position: absolute;" +
                                "margin-top: -30px;" +
                                "line-height: 30px;" +
                                "}" +
                                ".ke-content .inputValue_40:before {" +
                                "content: '需要支付 ' attr(input-value) ' 积分可见';" +
                                " color: #06b5ff;" +
                                "font-size:14px;" +
                                "position: absolute;" +
                                "margin-top: -30px;" +
                                "line-height: 30px;" +
                                "}" +
                                ".ke-content .inputValue_50:before {" +
                                "content: '需要支付 ' attr(input-value) ' 元费用可见';" +
                                " color: #06b5ff;" +
                                "font-size:14px;" +
                                "position: absolute;" +
                                "margin-top: -30px;" +
                                "line-height: 30px;" +
                                "}" +//突出编辑框的代码
                                ".ke-content .prettyprint {" +
                                "background:#f8f8f8;" +
                                "border:1px solid #ddd;" +
                                "padding:5px;" +
                                "}" +//默认字体大小
                                "body {" +
                                "font-size: 14px;" +
                                "}";

                            //指定要保留的HTML标记和属性。Object的key为HTML标签名，value为HTML属性数组，”.”开始的属性表示style属性。 注意属性要全部小写
                            KindEditor.options.htmlTags['hide'] = ['hide-type', 'input-value', 'class', 'description'];

                            var topicAvailableTag = document.getElementById("topicAvailableTag").value;
                            var topicAvailableTag_obj = null;//['source', '|','fontname','fontsize','emoticons'];
                            if (topicAvailableTag != "") {
                                var flag = false;
                                topicAvailableTag_obj = JSON.parse(topicAvailableTag);//JSON转为对象
                                if (topicAvailableTag_obj != null && topicAvailableTag_obj.length > 0) {
                                    for (var i = 0; i < topicAvailableTag_obj.length; i++) {
                                        var availableTag = topicAvailableTag_obj[i];
                                        if (availableTag == "hidePassword" || availableTag == "hideComment" ||
                                            availableTag == "hideGrade" || availableTag == "hidePoint" || availableTag == "hideAmount") {
                                            topicAvailableTag_obj.splice(i, 0, 'hide');//在指定索引处插入元素
                                            break;
                                        }
                                    }
                                    for (var i = 0; i < topicAvailableTag_obj.length; i++) {
                                        var availableTag = topicAvailableTag_obj[i];
                                        if (availableTag == "image") {//增加批量插入图片按钮
                                            topicAvailableTag_obj.splice(i + 1, 0, 'multiimage');//在指定索引处插入元素
                                            break;
                                        }
                                    }
                                }
                            }

                            //等级
                            var userGradeList = document.getElementById("userGradeList").value;
                            var userGradeList_obj = null;
                            if (userGradeList != "") {
                                userGradeList_obj = JSON.parse(userGradeList);//JSON转为对象
                            }
                            var editor;
                            KindEditor.ready(function (K) {


                                var fileSystem = document.getElementById("fileSystem").value;


                                editor = K.create('textarea[id="topicContent"]', {
                                    themeType: 'style :minimalist customization',//极简主题 加冒号的是主题样式文件名称同时也是主题目录
                                    basePath: '${commonPath}js/kindeditor/',//指定编辑器的根目录路径
                                    formatUploadUrl: false,//false时不会自动格式化上传后的URL
                                    resizeType: 1,//2或1或0，2时可以拖动改变宽度和高度，1时只能改变高度，0时不能拖动。默认值: 2
                                    autoHeightMode: true,//自适应高度
                                    allowPreviewEmoticons: true,//true或false，true时鼠标放在表情上可以预览表情
                                    allowImageUpload: true,//true时显示图片上传按钮
                                    uploadModule: parseInt(fileSystem),//上传模块 0.本地 10.SeaweedFS 20.MinIO 30.阿里云OSS
                                    uploadJson: 'user/control/topic/upload.htm?method=upload',//指定浏览远程图片的服务器端程序
                                    filePostName: 'file',//文件上传字段 默认imgFile
                                    fixToolBar: true,//浮动工具栏
                                    items: topicAvailableTag_obj,

                                    /**['source', 'fontsize', 'forecolor', 'hilitecolor', 'bold',
                                     'italic', 'underline',  '|', 'image', 'multiimage',
                                     'justifyleft','justifycenter','justifyright', 'insertorderedlist', 'insertunorderedlist',   'emoticons',
                                     'link', 'unlink','removeformat','hide'],**/
                                    userGradeList: userGradeList_obj,
                                    afterChange: function () {
                                        this.sync();
                                    },
                                    afterBlur: function () {
                                        this.sync();
                                    }

                                });
                            });
                        </script>

                    </form>
                </div>
            </div>
        <#else>
            <div class="addTopic-disableFormModule">
                <div class="disableForm-wrap">
                    <div class="respond">
                        <p>全站关闭发表话题</p>
                    </div>
                </div>
            </div>
        </#if>
    <#else>
    <#-- 未登录 -->
        <div class="addTopicModule">
            <div class="addTopic-wrap">
                <div class="respond">
                    <p>请
                        <a href="login">登录</a>
                        后发表话题。没有帐号？
                        <a href="register">注册</a> 一个。
                    </p>
                </div>
            </div>
        </div>
    </#if>
</@function>



